package com.situ.day4;

public class Student extends Object{
    //类里面的属性
    //学生编号
    int id;
    //名字
    String name;
    //年龄
    int age;
    //性别
    String gender;
    //boolean ok;

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }

    public String getInfo() {
        return "Student: [id: "+id+", name: "+name+", age: "+age+", gender: "+gender+"] ";
    }

    //类里面方法
    public void study() {
        System.out.println("id是"+id+"的"+name+"正在学习");
    }
}
